<template>
  <div class="home">
    <img alt="Vue logo" src="../assets/logo.png">
    <HelloWorld msg="Welcome to Your Vue.js + TypeScript App"/>
    <el-button type="primary" @click="handleAdd">添加</el-button>

    <edit-dialog :visible.sync="visible"/>
  </div>
</template>

<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'
import HelloWorld from '@/components/HelloWorld.vue'
import EditDialog from '@/components/edit-dialog.vue' // @ is an alias to /src

@Component({
  components: {
    EditDialog,
    HelloWorld
  }
})
export default class HomeView extends Vue {
  visible = false;

  handleAdd () {
    this.visible = true
  }
}
</script>
